package com.csdj.t309springboot.service;
import com.csdj.t309springboot.entity.JigsawPuzzle;
import com.csdj.t309springboot.mapper.JigsawPuzzleMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 拼图表 服务实现类
 * </p>
 *
 * @author 谭湛宇
 * @since 2022-01-14
 */
@Service
public class JigsawPuzzleService extends ServiceImpl<JigsawPuzzleMapper, JigsawPuzzle> implements IJigsawPuzzleService {
    @Resource
    private JigsawPuzzleMapper jigsawPuzzleMapper;
    /**
     * 查询拼图详情
     * @param jigsawPuzzleId
     * @return
     */
    public JigsawPuzzle getJigsawPuzzleInfo(int jigsawPuzzleId){
        return jigsawPuzzleMapper.selectById(jigsawPuzzleId);
    }
    /**
     * 查询所有拼图
     * @return
     */
    public List<JigsawPuzzle> getAllJigsawPuzzle(){
        return jigsawPuzzleMapper.selectList(null);
    }
}
